package GUI;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.LayoutManager;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class GUI_page04_RemoveSupplier extends JPanel {

	JLabel titleLabel;
	JButton returnButton;
	
	JLabel supplierNameLabel;
	JTextField supplierNameField;
	
	JLabel resultLabel;
	JButton submitButton;
	
	public GUI_page04_RemoveSupplier() {
		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		this.setBackground(Color.white);
		
		// title label
		titleLabel = new JLabel("Remove Supplier", JLabel.CENTER);
		titleLabel.setVerticalTextPosition(JLabel.CENTER);
		
		titleLabel.setHorizontalTextPosition(JLabel.CENTER);
		titleLabel.setAlignmentX(Component.LEFT_ALIGNMENT);
		titleLabel.setFont(new Font("Century Gothic", Font.BOLD, 20));
		titleLabel.setForeground(Color.gray);
		this.add(titleLabel);
        
		this.add(Box.createRigidArea(new Dimension(0,15)));

        // return button
		returnButton = GUI_AMSStoreMain.makeGrayWhiteButton("Cancel", Component.LEFT_ALIGNMENT);
		this.add(returnButton);
        
        this.add(Box.createRigidArea(new Dimension(0,10)));
        
        // supplier name field (the name of the supplier to be removed)
        supplierNameLabel = GUI_AMSStoreMain.makeLeftAlignedGrayLabel("Please enter the name of the supplier to be removed:", 11);
        this.add(supplierNameLabel);
		supplierNameField = GUI_AMSStoreMain.makeLeftGrayTextField("", 200);
		this.add(supplierNameField);
		
		this.add(Box.createRigidArea(new Dimension(0,10)));
		
		// result label
		resultLabel = GUI_AMSStoreMain.makeLeftAlignedGrayLabel("", 11);
        this.add(resultLabel);

		this.add(Box.createRigidArea(new Dimension(0,15)));

        // final continue (remove supplier) button
        submitButton = GUI_AMSStoreMain.makeGrayWhiteButton("Remove Supplier", Component.LEFT_ALIGNMENT);
        this.add(submitButton);
	}

}
